plot(Bahrain_ts_forecast)
options(max.print=1000000)
Bahrain_ts_forecast  <- forecast(Bahrain_ts_arima, h=240)
Bahrain_ts_forecast
plot(Bahrain_ts_forecast)
accuracy(Bahrain_ts_forecast)
sum(is.na(Bahrain_ts))
summary(Bahrain_ts)
cycle(Bahrain_ts)
tail(Bahrain_ts)
tail(Bahrain)
cycle(Bahrain_ts)
Bahrain_ts1 <- ts(Bahrain, start= 2000, end= 2019, frequency=12)
Bahrain_ts1
Cycle(Bahrain_ts1)
cycle(Bahrain_ts1)
tail(Bahrain_ts1)
Bahrain_ts1 <- ts(Bahrain, start= (2000,1), end= 2019, frequency=12)
Bahrain_ts1 <- ts(Bahrain, start= c(2000,1), end= 2019, frequency=12)
Bahrain_ts1
cycle(Bahrain_ts1)
Bahrain_ts1 <- ts(Bahrain, start= c(2000,1), end= c(2018,12), frequency=12)
Bahrain_ts1
cycle(Bahrain_ts1)
tail(Bahrain_ts1)
boxplot(Bahrain_ts1~cycle(Bahrain_ts1))
# Decomposing
Bahrain_ts1_decomp <- decompose(Bahrain_ts1)
plot(Bahrain_ts1_decomp)
Bahrain_ts1 <- ts(Bahrain, start= c(2000,1), end= c(2018,11), frequency=12)
Bahrain_ts1
cycle(Bahrain_ts1)
tail(Bahrain_ts1)
boxplot(Bahrain_ts1~cycle(Bahrain_ts1))
# Decomposing
Bahrain_ts1_decomp <- decompose(Bahrain_ts1)
plot(Bahrain_ts1_decomp)
# Model
Bahrain_ts1_model <- auto.arima(Bahrain_ts1)
Bahrain_ts1_model
auto.arima(Bahrain_ts1, ic="aic", trace = TRUE)
plot.ts(Bahrain_ts1_model$residuals)
# Forecasting
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
plot(Bahrain_ts1_forecast)
Bahrain_ts1_forecast
# Validating the model
Box.test(Bahrain_ts1_model, lag=5, type="Ljung-Box")
# Validating the model
Box.test(Bahrain_ts1_model$resid, lag=5, type="Ljung-Box")
Box.test(Bahrain_ts1_model$resid, lag=10, type="Ljung-Box")
Box.test(Bahrain_ts1_model$resid, lag=15, type="Ljung-Box")
start(Bahrain_ts1)
end(Bahrain_ts1)
head(Bahrain_ts1)
tail(Bahrain_ts1)
frequency(Bahrain_ts1)
# Observation
abline(reg=lm(Bahrain_ts1~time(Bahrain_ts1)))
acf(ts(Bahrain_ts1_model$residuals, main="ACF Residual")
# Indicates the stationarity of the model
plot.ts(Bahrain_ts1_model$residuals)
plot.ts(Bahrain_ts1_model$residuals)
acf(ts(Bahrain_ts1_model$residuals, main="ACF Residual")
# Forecasting
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
plot.ts(Bahrain_ts1_model$residuals)
acf(ts(Bahrain_ts1_model$residuals, main="ACF Residual")
pacf(ts(Bahrain_ts1_model$residuals, main="ACF Residual")
acf(ts(Bahrain_ts1_model$residuals, main="ACF Residual")
pacf(ts(Bahrain_ts1_model$residuals, main="ACF Residual")
acf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
pacf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
acf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
plot.ts(Bahrain_ts1_model$residuals)
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
plot(Bahrain_ts1_forecast)
Bahrain_ts1_forecast
plot.ts(Bahrain_ts1_model$residuals)
acf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
pacf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
library(tseries)
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
# Indicates the stationarity of the model
library(tseries)
plot.ts(Bahrain_ts1_model$residuals)
acf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
library(forecast)
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
plot(Bahrain_ts1_forecast)
Bahrain_ts1_forecast
# Indicates the stationarity of the model
library(tseries)
plot.ts(Bahrain_ts1_model$residuals)
acf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
# Decomposing
Bahrain_ts1_decomp <- decompose(Bahrain_ts1)
# Decomposing
Bahrain_ts1_decomp <- decompose(Bahrain_ts1)
plot(Bahrain_ts1_decomp)
plot(diff(log(Bahrain_ts1)))
plot(log(Bahrain_ts1))
plot(Bahrain_ts1)
plot(log(Bahrain_ts1))
plot(diff(log(Bahrain_ts1)))
acf(Bahrain_ts1)
acf(diff(log(Bahrain_ts1)))
library(tseries)
acf(Bahrain_ts1)
acf(diff(log(Bahrain_ts1)))
install.packages(tseries)
install.packages("tseries")
install.packages("tseries")
library(tseries)
acf(Bahrain_ts1)
acf(diff(log(Bahrain_ts1)))
acf(as.ts(diff(log(Bahrain_ts1))))
acf(ts(diff(log(Bahrain_ts1))))
install.packages("tseries")
acf(Bahrain_ts1)
acf(ts(diff(log(Bahrain_ts1))))
acf(diff(log(Bahrain_ts1)))
pacf(Bahrain_ts1)
pacf(diff(log(Bahrain_ts1)))
acf(Bahrain_ts1)
acf(diff(log(Bahrain_ts1)))
Bahrain_ts1 <- tsclean(Bahrain_ts1)
acf(Bahrain_ts1)
acf(diff(log(Bahrain_ts1)))
pacf(Bahrain_ts1)
acf(Bahrain_ts1)
acf(diff(log(Bahrain_ts1)))
pacf(Bahrain_ts1)
pacf(diff(log(Bahrain_ts1)))
install.packages("tseries")
acf(diff(log(Bahrain_ts1)))
library(tseries)
acf(Bahrain_ts1)
acf(diff(log(Bahrain_ts1)))
pacf(Bahrain_ts1)
pacf(diff(log(Bahrain_ts1)))
acf(Bahrain_ts1)
acf(log(Bahrain_ts1))
acf(ts(log(Bahrain_ts1)))
acf(ts(diff(log(Bahrain_ts1))))
acf(Bahrain_ts1)
acf(ts(log10(Bahrain_ts1)))
acf(ts(diff(log10(Bahrain_ts1))))
plot(aggregate(Bahrain_ts1,FUN=mean))
plot(Bahrain_ts1)
plot(Bahrain_ts1)
plot(aggregate(Bahrain_ts1,FUN=mean))
adf.test(diff(log(Bahrain_ts1)), alternative="stationary", k=0)
Bahrain_ts1 <- tsclean(Bahrain_ts1)
Bahrain_ts1 <- tsclean(Bahrain_ts1)
Bahrain_ts1 <- nnetar(tsclean(Bahrain_ts1))
install.packages("Forecast")
install.packages("forecast")
install.packages("forecast")
library(forecast)
Bahrain_ts1 <- tsclean(Bahrain_ts1)
Bahrain_ts1 <- nnetar(tsclean(Bahrain_ts1))
plot(Bahrain_ts1)
Bahrain_ts1
Bahrain_ts1 <- tsclean(Bahrain_ts1)
Bahrain_ts1 <- ts(Bahrain, start= c(2000,1), end= c(2018,11), frequency=12)
Bahrain_ts1
Bahrain_ts1 <- tsclean(Bahrain_ts1)
Bahrain_ts1
plot(Bahrain_ts1)
plot(aggregate(Bahrain_ts1,FUN=mean))
adf.test(diff(log(Bahrain_ts1)), alternative="stationary", k=0)
install.packages("tseries")
install.packages("tseries")
library(tseries)
adf.test(diff(log(Bahrain_ts1)), alternative="stationary", k=0)
adf.test(Bahrain_ts1), alternative="stationary", k=0)
adf.test((Bahrain_ts1), alternative="stationary", k=0)
adf.test(diff(log(Bahrain_ts1)), alternative="stationary", k=0)
adf.test(diff(log(Bahrain_ts1)), alternative="stationary",k=0)
plot(Bahrain_ts1)
plot(log(Bahrain_ts1))
plot(diff(log(Bahrain_ts1)))
acf(Bahrain_ts1)
acf(ts(log10(Bahrain_ts1)))
acf(log10(Bahrain_ts1))
acf(log(Bahrain_ts1))
acf(diff(log(Bahrain_ts1)))
acf(ts(diff(log10(Bahrain_ts1))))
pacf(Bahrain_ts1)
pacf(diff(log(Bahrain_ts1)))
# Observation
abline(reg=lm(Bahrain_ts1~time(Bahrain_ts1)))
Bahrain_ts1_model
Bahrain_ts1_model <- auto.arima(Bahrain_ts1, ic="aic", trace = TRUE)
# Model
# Best Model = model with the lowest aic value.
Bahrain_ts1_model <- auto.arima(Bahrain_ts1)
Bahrain_ts1_model
auto.arima(Bahrain_ts1, ic="aic", trace = TRUE)
plot.ts(Bahrain_ts1_model$residuals)
acf(ts(Bahrain_ts1)
pacf(ts(Bahrain_ts1_model$residuals, main='ACF Residual')
library(forecast)
plot.ts(Bahrain_ts1_model$residuals)
plot.ts(Bahrain_ts1_model$resid)
acf(ts(Bahrain_ts1)
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
library(forecast)
Bahrain_ts1_forecast <- forecast (Bahrain_ts1_model, level=c(95), h=10*12)
plot(Bahrain_ts1_forecast)
Bahrain_ts1_forecast
# Validating the model
Box.test(Bahrain_ts1_model$resid, lag=5, type="Ljung-Box")
Box.test(Bahrain_ts1_model$resid, lag=10, type="Ljung-Box")
Box.test(Bahrain_ts1_model$resid, lag=15, type="Ljung-Box")
# Importing Data
BahrainNew <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/BahrainNew.xlsx")
library(readxl)
BahrainNew <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/R Files/BahrainNew/BahrainNew.xlsx")
View(BahrainNew)
# Importing Data
BahrainNew <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/BahrainNew.xlsx")
# Importing Data
BahrainNew <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\R Files\BahrainNew\BahrainNew.xlsx")
# Importing Data
BahrainNew <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\R Files\BahrainNew/BahrainNew.xlsx")
# Importing Data
BahrainNew <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\R Files\BahrainNew\BahrainNew.xlsx")
# Checking the Imported Data
View(BahrainNew)
head(BahrainNew)
tail(BahrainNew)
# Creating Time Series Data
BahrainNew_ts <- ts(BahrainNew, start=c(2001,1), end=c(2018,11), frequency=12)
# Checking the Imported Data
BahrainNew_ts
cycle(BahrainNew_ts)
end(BahrainNew_ts)
frequency(BahrainNew_ts)
head(BahrainNew_ts)
tail(BahrainNew_ts)
sum(is.na(BahrainNew_ts))
install.packages("forecast")
library(forecast)
BahrainNew_ts <- tsclean(BahrainNew_ts)
summary(BahrainNew_ts)
BahrainNew_ts
# Plotting the Time Series Data
plot(BahrainNew_ts)
plot(aggregate(BahrainNew_ts,FUN=mean))
# Decomposing
BahrainNew_ts_decomp <- decompose(BahrainNew_ts)
plot(BahrainNew_ts_decomp)
# Testing for Stationarity
install.packages("tseries")
install.packages("tseries")
library(tseries)
adf.test((BahrainNew_ts), alternative="stationary", k=0)
# To see any seasonal effect
boxplot(BahrainNew_ts~cycle(BahrainNew_ts))
# To remove trend effect
BahrainNew_ts_diff <- diff(BahrainNew_ts)
plot(BahrainNew_ts_diff)
# To remove variance effect
BahrainNew_ts_log <- log(BahrainNew_ts)
plot(BahrainNew_ts_log)
# To remove both (Trend and Variance) effects
BahrainNew_ts_both <- diff(log(BahrainNew_ts))
plot(BahrainNew_ts_both)
# Testing for Stationarity
install.packages("tseries")
# Testing for Stationarity
# install.packages("tseries")
library(tseries)
adf.test(diff(log(BahrainNew_ts)), alternative="stationary",k=0)
acf(BahrainNew_ts)
acf(log(BahrainNew_ts))
acf(diff(BahrainNew_ts))
pacf(BahrainNew_ts)
pacf(log(BahrainNew_ts))
pacf(diff(BahrainNew_ts))
pacf(diff(log(BahrainNew_ts)))
# Observation
abline(reg=lm(BahrainNew_ts1~time(BahrainNew_ts)))
# Modelling
BahrainNew_ts_model <- auto.arima(BahrainNew_ts)
BahrainNew_ts_model
BahrainNew_ts_model <- auto.arima(BahrainNew_ts, ic="aic", trace = TRUE)
BahrainNew_ts_model
# Indicates the stationarity of the model
library(tseries)
plot.ts(BahrainNew_ts_model$resid)
acf(ts(BahrainNew_ts))
acf(ts(BahrainNew_ts_model$residuals, main='ACF Residual'))
acf(ts(BahrainNew_ts_model$resid, main='ACF Residual'))
pacf(ts(BahrainNew_ts_model$resid, main='ACF Residual'))
plot.ts(BahrainNew_ts_model$resid)
acf(ts(BahrainNew_ts))
acf(ts(BahrainNew_ts_model$resid, main='ACF Residual'))
pacf(ts(BahrainNew_ts_model$resid, main='ACF Residual'))
# Forecasting
options(max.print=1000000)
install.packages("forecast")
install.packages("forecast")
# library(forecast)
BahrainNew_ts_forecast <- forecast (BahrainNew_ts_model, level=c(95), h=10*12)
plot(BahrainNew_ts_forecast)
BahrainNew_ts_forecast
# Validating the model
Box.test(BahrainNew_ts_model$resid, lag=5, type="Ljung-Box")
Box.test(BahrainNew_ts_model$resid, lag=10, type="Ljung-Box")
Box.test(BahrainNew_ts_model$resid, lag=15, type="Ljung-Box")
accuracy(BahrainNew_ts_forecast)
library(readxl)
UAE <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/UAE.xlsx")
View(UAE)
# Importing Data
UAE <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\Excel Files\UAE.xlsx")
# Importing Data
UAE <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\Excel Files/UAE.xlsx")
# Checking the Imported Data
View(UAE)
head(UAE)
tail(UAE)
# Creating Time Series Data
UAE_ts <- ts(UAE, start=c(2001,1), end=c(2018,11), frequency=12)
# Checking the Imported Data
UAE_ts
cycle(UAE_ts)
start(UAE_ts)
end(UAE_ts)
frequency(UAE_ts)
head(UAE_ts)
tail(UAE_ts)
sum(is.na(UAE_ts))
install.packages("forecast")
install.packages("forecast")
BahrainNew <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/BahrainNew.xlsx")
library(forecast)
UAE_ts <- tsclean(UAE_ts)
summary(UAE_ts)
UAE_ts
# Plotting the Time Series Data
plot(UAE_ts)
plot(aggregate(UAE_ts,FUN=mean))
# Decomposing
UAE_ts_decomp <- decompose(UAE_ts)
plot(UAE_ts_decomp)
# Testing for Stationarity
install.packages("tseries")
library(tseries)
adf.test((UAE_ts), alternative="stationary", k=0)
# To see any seasonal effect
boxplot(UAE_ts~cycle(UAE_ts))
# To remove trend effect
UAE_ts_diff <- diff(UAE_ts)
plot(UAE_ts_diff)
# To remove variance effect
UAE_ts_log <- log(UAE_ts)
plot(UAE_ts_log)
# To remove both (Trend and Variance) effects
UAE_ts_both <- diff(log(UAE_ts))
plot(UAE_ts_both)
library(tseries)
adf.test(diff(log(UAE_ts)), alternative="stationary",k=0)
library(tseries)
acf(UAE_ts)
acf(log(UAE_ts))
acf(diff(UAE_ts))
acf(diff(log(UAE_ts)))
pacf(UAE_ts)
pacf(log(UAE_ts))
pacf(diff(UAE_ts))
pacf(diff(log(UAE_ts)))
# Modelling
UAE_ts_model <- auto.arima(UAE_ts)
UAE_ts_model
# Modelling
UAE_ts_model <- auto.arima(UAE_ts)
# Importing Data
UAE <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/UAE.xlsx")
# Importing Data
UAE <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files\UAE.xlsx")
# Importing Data
UAE <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\Excel Files\UAE.xlsx")
# Importing Data
UAE <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\Excel Files/UAE.xlsx")
# Importing Data
UAE <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\Excel Files/UAE.xlsx")
# Importing Data
UAE <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Thesis\Analysis Folder\Excel Files\UAE.xlsx")
# Checking the Imported Data
View(UAE)
head(UAE)
tail(UAE)
# Creating Time Series Data
UAE_ts <- ts(UAE, start=c(2001,1), end=c(2018,11), frequency=12)
# Creating Time Series Data
UAE_ts <- ts(UAE, start=c(2001,1), end=c(2018,11), frequency=12)
# Viewing and Checking the Created Time Series Data
UAE_ts
cycle(UAE_ts)
start(UAE_ts)
end(UAE_ts)
frequency(UAE_ts)
head(UAE_ts)
tail(UAE_ts)
sum(is.na(UAE_ts))
install.packages("forecast")
library(forecast)
UAE_ts <- tsclean(UAE_ts)
summary(UAE_ts)
UAE_ts
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(UAE_ts)
plot(aggregate(UAE_ts,FUN=mean))
# Decomposing
UAE_ts_decomp <- decompose(UAE_ts)
plot(UAE_ts_decomp)
# Testing for Stationarity
acf(UAE_ts, lag.max=20)
pacf(UAE_ts, lag.max=20)
install.packages("tseries")
install.packages("tseries")
library(tseries)
adf.test((UAE_ts), alternative="stationary", k=0)
# To see any seasonal effect
boxplot(UAE_ts~cycle(UAE_ts))
# To remove trend effect
UAE_ts_diff <- diff(UAE_ts)
plot(UAE_ts_diff)
# To remove variance effect
UAE_ts_log <- log(UAE_ts)
plot(UAE_ts_log)
# To remove both (Trend and Variance) effects
UAE_ts_both <- diff(log(UAE_ts))
plot(UAE_ts_both)
# Testing for Stationarity
# install.packages("tseries")
library(tseries)
adf.test(diff(log(UAE_ts)), alternative="stationary",k=0)
# Dealing with ACF and PACF
# install.packages("tseries")
library(tseries)
acf(UAE_ts, lag.max=20)
acf(log(UAE_ts), lag.max=20)
acf(UAE_ts, lag.max=20)
acf(log(UAE_ts), lag.max=20)
acf(diff(UAE_ts), lag.max=20)
acf(diff(UAE_ts), lag.max=20)
acf(UAE_ts, lag.max=20)
acf(log(UAE_ts), lag.max=20)
acf(diff(UAE_ts), lag.max=20)
acf(diff(log(UAE_ts)), lag.max=20)
pacf(UAE_ts, lag.max=20)
pacf(log(UAE_ts), lag.max=20)
pacf(diff(UAE_ts), lag.max=20)
pacf(diff(log(UAE_ts)), lag.max=20)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
UAE_ts_model <- auto.arima(UAE_ts)
UAE_ts_model
UAE_ts_model <- auto.arima(UAE_ts, ic="aic", trace = TRUE)
UAE_ts_model
# Step-3 of the Box-Jenkins Methodology (Diagnosis Checking)
library(tseries)
plot.ts(UAE_ts_model$resid)
acf(ts(UAE_ts_model$residuals, main='ACF Residual'))
acf(UAE_ts_model$residuals, main='ACF Residual')
pacf(UAE_ts_model$residuals, main='ACF Residual')
Box.test(UAE_ts_model$resid, lag=20, type="Ljung-Box")
# Forecasting
options(max.print=1000000)
# install.packages("forecast")
library(forecast)
UAE_ts_forecast <- forecast (UAE_ts_model, level=c(95), h=5)
plot(UAE_ts_forecast)
UAE_ts_forecast <- forecast (UAE_ts_model, level=c(95), h=10)
plot(UAE_ts_forecast)
UAE_ts_forecast <- forecast (UAE_ts_model, level=c(95), h=240)
plot(UAE_ts_forecast)
UAE_ts_forecast
library(readxl)
sales <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Sem III SCIN/Statistics/sales.xlsx")
View(sales)
Time
attach(Sales)
Time
Time
attach(Sales)
Time
Sales
> sales <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Sem III SCIN/Statistics/sales.xlsx")
sales <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Sem III SCIN/Statistics/sales.xlsx")
sales <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Sem III SCIN/Statistics\sales.xlsx")
sales <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Sem III SCIN/Statistics/sales.xlsx")
sales <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Sem III SCIN\Statistics\sales.xlsx")
sales <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Sem III SCIN\Statistics\sales.xlsx")
library(readxl)
sales <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Sem III SCIN/Statistics/sales.xlsx")
View(sales)
sales <- read_excel("C:\Users\Biniam\Desktop\Documents\Academic\Sem III SCIN\Statistics\sales.xlsx")
sales
summary(sales)
modl1= lm(sales~., data = sales)
modl1 <- lm(sales~., data = sales)
install.packages("car")
library(car)
modl1 <- lm(sales~., data = sales)
modl1 <- lm(sales~., data = sales, drop.unused.levels = TRUE)
